package book;

public class BookList {
    public Book[] bookList = new Book[10];
    private  int usedSize;//当前书架有几本书

    public BookList() {
        this.bookList[0] =  new Book("三国演义","罗贯中",50,"小说");
        this.bookList[1] =  new Book("西游记","吴承恩",48,"小说");
        this.bookList[2] =  new Book("水浒传","施耐庵",49,"小说");
        this.usedSize = 3;
    }

    public int getUsedSize() {
        return usedSize;
    }

    public void setUsedSize(int usedSize) {
        this.usedSize = usedSize;
    }
    //把书放到pos位置
    public void setBookList(int pos,Book book) {
        bookList[pos] = book;
    }
    //获取pos位置的书
    public Book getBookList(int pos) {
        return bookList[pos];

    }
}
